﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Mail;
using System.Security;

namespace MyFitness.Model
{
    partial class User
    {
        # region Declared Variables
        private Guid id;
        # endregion

        /// <summary>
        /// Constructor
        /// </summary>
        public User()
        {
            // Assigns a globally unique id to each user.
            id = Guid.NewGuid();
        }

        /// <summary>
        /// Copy Contructor
        /// </summary>
        /// <param name="p"></param>
        public User(User u)
        {
            UpdateUser(u);
        }

        /// <summary>
        /// Updates a user from another user object.
        /// </summary>
        /// <param name="u"></param>
        public void UpdateUser(User u)
        {
            FirstName = u.FirstName;
            LastName = u.LastName;
            id = u.id;
            Email = u.Email;
            Password = u.Password;
        }
    }
}
